package kr.ac.jejuuniv.repository;

import kr.ac.jejuuniv.model.Bookmark;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

//@Repository
public class HibernateBookmarkRepositoryImpl implements BookmarkRepository {
	@Autowired
	private HibernateTemplate hibernateTemplate; 
	
	public void insert(Bookmark bookmark) {
		System.out.println("insert "+bookmark);
		hibernateTemplate.save(bookmark);
	}

	public void delete(String id) {
		Bookmark bookmark =new Bookmark();
		bookmark.setId(id);
		hibernateTemplate.delete(bookmark);
	}
}
